{% extends "main/index.html" %}

{% load i18n %}


<link type="text/css" rel="stylesheet" href="/site-media/default.css" />
{% block title %}
<head><title>{% trans "User " %}{{ local_user.username }}</title></head>
{% endblock %}
{% block content %}
    <div class="titulo_contenedor">
        <span>{% trans "User " %}{{ local_user.username }}</span>
    </div>
    <div class="cuerpo_contenedor">
        <div class="user_details">
            <label>{% trans "First name" %}: </label>
            <span class="user_details">{{ local_user.first_name }}</span><br/>
            <label>{% trans "Last name" %}: </label>
            <span class="user_details">{{ local_user.last_name }}</span><br/>
            <label>{% trans "Email" %}: </label>
            <span class="user_details">{{ local_user.email }}</span><br/>
            <label>{% trans "NIC" %}: </label>
            <span class="user_details">{{ local_user.NIC }}</span><br/>
            <label>{% trans "Role" %}: </label>
            <span class="user_details">{{ local_user.get_role_display }}</span><br/>
        </div>
        <hr/>
        <br/>
        <table>
            <tr>
                {% if local_user.first_name %}
                    <th>{% trans "Documents created by " %}{{ local_user.first_name }}</th>
                {% else %}
                    <th>{% trans "Documents created by " %}{{ local_user.username }}</th>
                {% endif %}
            </tr>
            {% if documents %}
                {% for document in documents%}
                <tr>
                    <td><a href="/documents/view_document/{{document.numDoc}}/comments">{{ document.numDoc }}</a></td>
                </tr>
                {% endfor %}
            {% else %}
            <tr>
                <td>{% trans "There are currently no documents created by this author." %}</td>
            </tr>
            {% endif %}
        </table>
    </div>
    <div class="fondo_contenedor">
    </div>
{% endblock %}    
